package com.newtype.meeting.client.service;

import java.util.ArrayList;
import java.util.HashMap;

import com.extjs.gxt.ui.client.data.PagingLoadConfig;
import com.extjs.gxt.ui.client.data.PagingLoadResult;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.newtype.meeting.client.model.Account;
import com.newtype.meeting.client.model.Member;
import com.newtype.meeting.shared.AccountDTO;
import com.newtype.meeting.shared.AccountSummaryDTO;

public interface AccountServiceAsync {

	void addAccount(Account account, AsyncCallback<Void> callback);

	void checkLogin(HashMap<String, String> loginInfo,
			AsyncCallback<Account> callback);

	void deleteAccount(String id, AsyncCallback<Boolean> callback);

	void getAccount(String id, AsyncCallback<AccountDTO> callback);

	void getAccounts(PagingLoadConfig config, String status,
			AsyncCallback<PagingLoadResult<AccountSummaryDTO>> callback);

	void updateAccount(AccountDTO accountDTO, AsyncCallback<AccountDTO> callback);

	void getAccountSummaries(String status,
			AsyncCallback<ArrayList<AccountSummaryDTO>> callback);

	void getAccountsByTitleID(String titleID,
			AsyncCallback<ArrayList<AccountSummaryDTO>> callback);

	void checkExist(String accountID, AsyncCallback<Boolean> callback);

	void saveMember(Member member, AsyncCallback<Void> callback);

	void getAccountSummaryDTO(String id,
			AsyncCallback<AccountSummaryDTO> callback);

	void getAccountByAccountID(String accountID, AsyncCallback<Account> callback);
	/**
	 * 功能：通过邮箱地址获取该用户信息
	 * @param email 邮箱地址
	 * @param callback
	 */
	void getAccountByEmail(String email, AsyncCallback<Account> callback);

}
